import Vue from 'vue'
import VueRouter from 'vue-router'
import UserView from "@/views/UserView.vue";
import AdminView from "@/views/AdminView.vue";
import RegisterView from '@/views/RegisterView.vue';
import LoginView1 from '@/views/LoginView1.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/user',
    name: 'user',
    component: UserView
  },
  {
    path: '/admin',
    name: 'admin',
    component: AdminView
  },

  {
    path:'/register',
    name:'register',
    component:RegisterView
  },
  {
    path:'/login',
    name:'login',
    component:LoginView1
  },

]

const router = new VueRouter({
  mode:'history',
  base:process.env.BASE_URL,
  routes
})

export default router
